Home > biomechZoo > Toolbox > Machine Learning > train_test_split.m

train_test_split

PURPOSE ^

TRAIN_TEST_SPLIT spliting ml_data into train test sets

SYNOPSIS ^

function ml_data=train_test_split(x,y,VariableName,subject,subject_wise,split,seed)

DESCRIPTION ^

 TRAIN_TEST_SPLIT spliting ml_data into train test sets

 ARGUMENTS
   x           ...   double array, features for classification.
   y           ...   double array or cell array of char, conditions to classify.
   VariableName...   cell array char, Name of the variables Use this VariableName=table_event.Properties.VariableNames(1:end-2);
   subjects     ...  string cell, subject name of all the subjects.
   subject_wise ...  bool, subject_wise=0 random spliting subject_wise=1 ml_data spliting based on subjects
   split        ...  [0,1], percent of ml_data to be hold out for testing.
   seed         ...  Positive integer. Random seed. Default 0

 RETURNS
   ml_data        ...  Struct containing train, test, Conditions, Classification parameters and etc...

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 10-Mar-2024 22:39:06 by m2html © 2005